package day01;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Scanner;

public class FileOutputStreamDemo01 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fout = new FileOutputStream("D:\\dev\\tool\\资料\\fout.txt",true);
        Scanner sc = new Scanner(System.in);
        while(true) {
            System.out.println("请输入");
            String msg = sc.nextLine();
            fout.write(msg.getBytes());
            fout.write("\r\n".getBytes());
            if ("886".equals(msg)) {
//                fout.flush();
                break;
            }
//            fout.close();
        }
    }
}
